package com.wardrobe.configuration;

import com.wardrobe.soa.common.QiniuFileUploadClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Created by m1304 on 2018/8/8.
 */
@Configuration
public class BeanConfiguration {

    @Bean("qiniuFileUploadClient")
    public QiniuFileUploadClient getQiniuFileUploadClient(@Value("${qiniu.access_key}") String access_key, @Value("${qiniu.secret_key}") String secret_key, @Value("${qiniu.bucket}") String bucket){
        QiniuFileUploadClient client = new QiniuFileUploadClient(access_key,secret_key,bucket);
        return client;
    }

}
